<%@ page language="java" contentType="text/html; charset=UTF-8"
    pageEncoding="UTF-8"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<%@ include file="validProgrammer.jsp" %>
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
<title>Insert title here</title>
<script type="text/javascript">
 function checkInput(){
 var time1="0",time2="0",time3="0",timeCfg="000";
   var temp1="0",temp2="0",temp3="0",tempCfg="000";
 if( document.getElementById("radioTime11").checked) { time1="1";} 
  if( document.getElementById("radioTime12").checked) { time1="2";} 
   
 if( document.getElementById("radioTime21").checked) { time2="1";} 
  if( document.getElementById("radioTime22").checked) { time2="2";} 
  
 if( document.getElementById("radioTime31").checked) { time3="1";} 
  if( document.getElementById("radioTime32").checked) { time3="2";} 
  
   if( document.getElementById("radioTemp11").checked) { temp1="1"; } 
  if( document.getElementById("radioTemp12").checked) { temp1="2";  } 
   if( document.getElementById("radioTemp13").checked) { temp1="3";  } 
 if( document.getElementById("radioTemp21").checked) { temp2="1"; } 
  if( document.getElementById("radioTemp22").checked) { temp2="2"; } 
   if( document.getElementById("radioTemp23").checked) { temp2="3"; }   
 if( document.getElementById("radioTemp31").checked) { temp3="1"; } 
  if( document.getElementById("radioTemp32").checked) { temp3="2"; } 
   if( document.getElementById("radioTemp33").checked) { temp3="3"; }
  
   timeCfg=time1+time2+time3;
   //alert(timeCfg);
    tempCfg=temp1+temp2+temp3;
   document.getElementById("timeCfg").value = timeCfg;
    document.getElementById("tempCfg").value = tempCfg;
    //alert(tempCfg);
 //  document.getElementById("tempCfg").value = tempCfg;
 document.getElementById("form_createMachine").submit();
}
 </script>
 
</head>
<body>

<h1 align="center">自提柜管理</h1>    
    <h2>新增自提柜</h2> 
   <form id="form_createMachine" action="<%=request.getContextPath()%>/programmer4Jsp";  >
    <input type="hidden" name="affair" value="createMachine" /><br/>
   <p style="width: 180px; display: inline;  ">密码：</p>   <input type="password" name="secret" style="width: 100pt;"/> <br/>
   <p style="width: 180px; display: inline; ">所属业主：</p>   <input type="text" name="owner"  value="${owner}" style="width: 100pt;"/> ${owner} <br/>
   <p style="width: 180px; display: inline; ">箱格数量：</p>   <input type="text" name="boxNum"  value="${boxNum}" style="width: 100pt;"/> ${boxNum} <br/>
   <p style="width: 180px; display: inline; ">箱格体积：</p>   <input type="text" name="boxVolume" style="width: 100pt;"/> <br/>
     <p style="width: 180px; display: inline; ">名称：</p>  <input type="text" name="name" style="width: 200pt;" /><br/>
    <p style="width: 180px; display: inline; ">地址：</p>  <input type="text" name="address" style="width: 200pt;" /><br/>
     <p style="width: 180px; display: inline; ">搜索匹配：</p>  <input type="text" name="search" style="width: 200pt;" /><br/>
   <p style="width: 180px; display: inline; ">经度：</p>  <input type="text" name="longitude" style="width: 100pt;" /><br/>
      <p style="width: 180px; display: inline; ">维度：</p>  <input type="text" name="latitude" style="width: 100pt;" /><br/>
    <p style="width: 180px; display: inline; ">早班最早送达时间：</p>  <input type="text" name="timeAEM" style="width: 100pt;" /><br/>
        <p style="width: 180px; display: inline; ">早班约定送达时间：</p>  <input type="text" name="timeAAM" style="width: 100pt;" /><br/>
            <p style="width: 180px; display: inline; ">早班最迟取走时间：</p>  <input type="text" name="timeTLM" style="width: 100pt;" /><br/>
                <p style="width: 180px; display: inline; ">早班最迟回收时间：</p>  <input type="text" name="timeRLM" style="width: 100pt;" /><br/>
     <p style="width: 180px; display: inline; ">中班最早送达时间：</p>  <input type="text" name="timeAEN" style="width: 100pt;" /><br/>
        <p style="width: 180px; display: inline; ">中班约定送达时间：</p>  <input type="text" name="timeAAN" style="width: 100pt;" /><br/>
            <p style="width: 180px; display: inline; ">中班最迟取走时间：</p>  <input type="text" name="timeTLN" style="width: 100pt;" /><br/>
                <p style="width: 180px; display: inline; ">中班最迟回收时间：</p>  <input type="text" name="timeRLN" style="width: 100pt;" /><br/>
    <p style="width: 180px; display: inline; ">晚班最早送达时间：</p>  <input type="text" name="timeAEE" style="width: 100pt;" /><br/>
        <p style="width: 180px; display: inline; ">晚班约定送达时间：</p>  <input type="text" name="timeAAE" style="width: 100pt;" /><br/>
            <p style="width: 180px; display: inline; ">晚班最迟取走时间：</p>  <input type="text" name="timeTLE" style="width: 100pt;" /><br/>
                <p style="width: 180px; display: inline; ">晚班最迟回收时间：</p>  <input type="text" name="timeRLE" style="width: 100pt;" /><br/>
   <p style="width: 180px; display: inline; ">是否启用：</p> <input  type="radio" id="radioUse1" name="inuse"  value="1">启用       <input  type="radio" id="radioUse2" name="inuse"  value="2" >不启用    <br/>
   <p style="width: 180px; display: inline; ">早班启用配置：</p> <input  type="radio" id="radioTime11"  name="time1" value="1">启用        <input  type="radio" id="radioTime12" name="time1" value="2">不启用     </br> 
    <p style="width: 180px; display: inline; ">中班启用配置：</p> <input  type="radio" id="radioTime21" name="time2" value="1">启用        <input  type="radio" id="radioTime22" name="time2" value="2">不启用    </br> 
     <p style="width: 180px; display: inline; ">晚班启用配置：</p> <input  type="radio" id="radioTime31" name="time3" value="1">启用        <input  type="radio" id="radioTime32" name="time3" value="2">不启用  </br> 
      <p style="width: 180px; display: inline; ">早班温度配置：</p> <input  type="radio" id="radioTemp11" name="temp1"   value="1">常温        <input  type="radio" id="radioTemp12" name="temp1"  value="2" >加热    <input  type="radio" id="radioTemp13" name="temp1"  value="3" >制冷  </br> 
      <p style="width: 180px; display: inline; ">中班温度配置：</p> <input  type="radio" id="radioTemp21" name="temp2"  value="1">常温        <input  type="radio" id="radioTemp22" name="temp2"  value="2" >加热    <input  type="radio" id="radioTemp23" name="temp2"  value="3">制冷 </br>   
      <p style="width: 180px; display: inline; ">晚班温度配置：</p> <input  type="radio" id="radioTemp31" name="temp3"  value="1">常温        <input  type="radio" id="radioTemp32" name="temp3"  value="2" >加热    <input  type="radio" id="radioTemp33" name="temp3"  value="3" >制冷   </br> 
     
    <input type="hidden" id="timeCfg"  name="timeCfg" /> <input type="hidden" id="tempCfg"  name="tempCfg" />
    <input type="button" value="创建" onclick="checkInput();" /> <br/>
    </form> 
    <br/>
    <br/>
    <br/>

</body>
</html>

<script> 
//取出传回来的参数error并与yes比较
  var errorInfoA ='<%=request.getParameter("errorInfo")%>';
  var  errorInfo=decodeURI(errorInfoA);
  if(errorInfo!='null'){
   alert(errorInfo);}

</script>

